﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Principal;

namespace Heritage.Identity
{
    public class CustomIdentity : IIdentity
    {

        string name = null;

        public CustomIdentity(string auth)
        {
            name = auth;//auth.Split(new[] { '=' })[1].Trim();
        }

        #region IIdentity Members

        public string AuthenticationType
        {
            get { return "CustomAuthentication"; }
        }

        public bool IsAuthenticated
        {
            get { return !string.IsNullOrEmpty(name); }
        }

        public string Name
        {
            get { return name; }
        }

        #endregion
    }
}